# ====================================================================

cmake_minimum_required(VERSION 2.8)

project(JWrapper)

# ====================================================================

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/lib)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/app)

# ====================================================================

add_subdirectory(libjpeg)

# ====================================================================

include_directories(
        libjpeg/include
        src/jwrapper
    )

add_executable(
        jfmt
        src/app/jfmt/main.cpp
        src/jwrapper/jdecoder.c
    )
target_link_libraries(jfmt libjpeg)

add_executable(
        jclip
        src/app/jclip/main.cpp
        src/jwrapper/jdecoder.c
        src/jwrapper/jencoder.c
    )
target_link_libraries(jclip libjpeg)

add_executable(
        jerase
        src/app/jerase/main.cpp
        src/jwrapper/jdecoder.c
        src/jwrapper/jencoder.c
    )
target_link_libraries(jerase libjpeg)

add_executable(
        jexcl
        src/app/jexcl/main.cpp
        src/jwrapper/jdecoder.c
        src/jwrapper/jencoder.c
    )
target_link_libraries(jexcl libjpeg)

add_executable(
        jthre
        src/app/jthre/main.cpp
        src/jwrapper/jdecoder.c
        src/jwrapper/jencoder.c
    )
target_link_libraries(jthre libjpeg)

# ====================================================================
